package cn._2dland.events
{
	import flash.events.Event;

	/**
	 * 视频相关的事件
	 */
	public class VideoEvent extends Event
	{
		/** 视频准备完成 */
		public static const READY:String = "ready";
		/** 视频信息更新 */
		public static const INFO_UPDATE:String = "infoUpdate";
		/** 视频缓冲完成 */
		public static const BUFFER_COMPLETE:String = "bufferComplete";
		/** 视频播放 */
		public static const PLAY:String = "play";
		/** 视频暂停 */
		public static const PAUSE:String = "pause";
		/** 视频停止 */
		public static const STOP:String = "stop";
		/** 视频播放中 */
		public static const PLAYING:String = "playing";
		/** 视频分段切换 */
		public static const CHANGE_PART:String = "changePart";
		/** 视频定位 */
		public static const SEEK:String = "seek";

		// 视频分段
		private var _partIndex:int = 0;
		// 播放头
		private var _playhead:Number = 0.0;

		public function VideoEvent(type:String, partIndex:int=0, playhead:Number=0.0)
		{
			super(type);
			_partIndex = partIndex;
			_playhead = playhead;
		}

		public function get partIndex():int{
			return _partIndex;
		}

		public function get playhead():Number{
			return _playhead;
		}
	}
}